|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | calibrateADC (void) |
| void | main (void) |
| void | ADC12ISR (void) |
Variables | |
| uint16_t | temp |
| volatile float | DegF |
| volatile float | DegC |
| float | mref |
| float | nref |
| uint8_t | bADCCAL_bytes |
| struct s_TLV_ADC_Cal_Data * | pADCCAL |
| void ADC12ISR | ( | void | ) |
Definition at line 215 of file tlv_ex3_calibrateTempSensor.c.
References __bic_SR_register_on_exit(), and temp.
| void calibrateADC | ( | void | ) |
Definition at line 127 of file tlv_ex3_calibrateTempSensor.c.
References bADCCAL_bytes, mref, nref, and pADCCAL.
| void main | ( | void | ) |
Definition at line 93 of file tlv_ex3_calibrateTempSensor.c.
References __no_operation(), calibrateADC(), DegC, DegF, mref, nref, and temp.
| uint8_t bADCCAL_bytes |
Definition at line 78 of file tlv_ex3_calibrateTempSensor.c.
| volatile float DegC |
Definition at line 76 of file tlv_ex3_calibrateTempSensor.c.
| volatile float DegF |
Definition at line 75 of file tlv_ex3_calibrateTempSensor.c.
| float mref |
Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.
| float nref |
Definition at line 77 of file tlv_ex3_calibrateTempSensor.c.
| struct s_TLV_ADC_Cal_Data* pADCCAL |
Definition at line 79 of file tlv_ex3_calibrateTempSensor.c.
| uint16_t temp |
TLV - Sample Calibrated A30 Internal Temp Sensor as Input, AVcc Ref
After initialization, the the calibration constants for the unit are read in through the TLV. A single sample is made on A30 with reference to internal 1.2V Vref. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12 internal oscillator times sample and conversion. In Mainloop MSP430 waits in LPM4 to save power until ADC12 conversion complete, ADC12_B_ISR will force exit from any LPMx in Mainloop on reti.
The results of the temperature sense can be viewed in the watch window by watching the variables DegC and DegF
ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz, ADC12CLK = ADC12OSC
MSP430FR5969
-----------------
/|\| |
| | |
--|RST |
|Temp Sensor-->A30|
| |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 74 of file tlv_ex3_calibrateTempSensor.c.